package code.rocky.thread;

import java.util.Map;

public class ThreadInfo {

    public static void main(String[] args) {
        Map<Thread, StackTraceElement[]> traces = Thread.getAllStackTraces();
        // Monitor Ctrl-Break 检查死锁信息,监控检测
        for (Thread thread : traces.keySet()) {
            System.out.println("线程名: " + thread.getName());
        }
    }
}
